<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
			<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
		<title>账号相关</title>
		<script src="__PUBLIC__/lib/zepto.min.js"></script>
		<script src="__PUBLIC__/js/frozen.js"></script>
		<script src="__PUBLIC__/js/myjs/UserInfo.js"></script>
        <script>
            var removeUrl="{:U('Index/UserInfo/removeAds','','')}";
            var actionUrl="{:U('Index/UserInfo/actionAddress','','')}";
           
        </script>
        <link rel="stylesheet" href="__PUBLIC__/css/frozen.css" />
        <link rel="stylesheet" href="__PUBLIC__/css/iconfont.css" />
        <link rel="stylesheet" href="__PUBLIC__/css/myCss.css" />
	</head>
	<body>
		<header class="ui-header ui-header-stable ui-border-b">
			<i class="ui-icon-return" onclick="history.back()"></i>
			<h1>账号相关</h1>
		</header>
		<footer class="ui-footer ui-footer-stable ui-border-t ui-footer-my">
			<ul class="ui-tiled">
                <li onclick="location.href='{:U('Index/index','','',0,true)}'" >
                    <div class="iconfont icon-home"></div>
                </li>
                <li onclick="location.href='{:U('Index/ProductList','','',0,true)}'" >
                    <div class="iconfont icon-shop"></div>
                </li>
                <li onclick="location.href='{:U('Index/MyShop','','',0,true)}'">
                    <div class="iconfont icon-peoplefill"></div>
                </li>
            </ul>
		</footer>
		<section class="ui-container" >
            
             <!--用户信息--> 
            <div style="margin:5px;">
                <div style="margin-top:3px;">
					<section class="ui-placehold-img">
						<span style="background-image:url(http://placeholder.qiniudn.com/640x200)"></span>
					</section>
                </div>
                <div class="ui-form ui-border-t " style="margin-top:2px;">
                    <ul class="ui-justify ui-whitespace ui-border-b ui-form-item">
                        <li><p style="color:#555;">昵称</p></li>
                        <li><p style="color:#777">{$userInfo.Name}</p></li>
                    </ul>
                    <ul class="ui-justify ui-whitespace ui-border-b ui-form-item">
                        <li><p style="color:#555;">钱包余额</p></li>
                        <li><p style="color:#777">{$userInfo.Money}</p></li>
                    </ul>
                     <ul class="ui-justify ui-whitespace ui-border-b ui-form-item">
                        <li><p style="color:#555;">累计消费额</p></li>
                        <li><p style="color:#777">{$userInfo.TotalSpend}</p></li>
                    </ul>
                     <ul class="ui-justify ui-whitespace ui-border-b ui-form-item">
                        <li><p style="color:#555;">已购商品数</p></li>
                        <li><p style="color:#777">{$userInfo.TotalCount}件</p></li>
                    </ul>
                </div>
                <!--地址管理--> 
                <div class="ui-form ui-border-t" style="margin-top:10px; ">
                    <form action="#">
                        <div onclick="actionAddressBar();" class="ui-form-item ui-form-item-show ui-border-b" style="margin-left:-5px;">
                            <i  class="ui-icon-scan" style="display:inline;font-size:27px;"></i>
                            <label for="#" style="width:100px;">管理收货地址</label>
                            <i  class="ui-icon-unfold" style="float:right;display:inline;font-size:25px;"></i>
                        </div>
                    </form>
                </div>
                <!--地址管理信息--> 
                <div id="div_AddressSet" style="display:null;">
                    <ul style="margin-top:-1px;" class="ui-list ui-list-text ui-list-active ui-list-cover ui-border-tb">
                        <foreach name="AddressList" item="v" >
                            <li class="ui-border-t" id="{$v.InfoId}">
                                    <div class="ui-list-info" onclick="popAction(this);">
                                    <p class="ui-nowrap">{$v.TakeName}&&{$v.TakePhone}</p>
                                    <p class="ui-nowrap">{$v.TakeAddress}</p>
                                </div>
                                <i  class="{$v.YnDefault}" style="display:inline;font-size:27px;"></i>
                            </li>
                        </foreach>
                        <li class="ui-border-t" onclick="addNewAddress();" >
                            <i  id="newAddress"  style="font-size:17px;line-height:23px;color:#777;">+ 添加新地址</i>
                        </li>
                    </ul>
                </div>   
            </div>
             <!--地址操作底部菜单-->   
            <div  class="ui-actionsheet">  
                <div class="ui-actionsheet-cnt">
                    <h4>设置默认值或删除地址</h4> 
                    <button onclick="setDefaultAddress();">设为/取消默认值</button>
                    <button onclick="updateAddresss();">修改</button>   
                    <button onclick="removeAddress();" class="ui-actionsheet-del">删除</button>
                    <button onclick="closeMsg();">取消</button> 
                </div>         
            </div> 
            <!--添加新地址输入框-->     
            <div class="ui-dialog">
                <div class="ui-dialog-cnt" >
                    <form action="#" style="color:#777;" >
                        <div class="ui-flex ui-flex-pack-center" style="padding-top:7px;">
                            <h4 style="color:#777;align:center;font-size:20px;">添加新地址</h4>
                        </div>
                        <div class="ui-form-item  ui-border-b">
                            <input id="adsName" type="text" placeholder="收件人姓名" style="padding-left:10px;">
                            <a href="#" class="ui-icon-close" onclick="$('#adsName').val('');">
                            </a>
                        </div>
                        <div class="ui-form-item  ui-border-b">
                            <input id="adsPhone" type="text" placeholder="11位手机号码" style="padding-left:10px;">
                            <a href="#" class="ui-icon-close" onclick="$('#adsPhone').val('');">
                            </a>
                        </div>
                        <div class="ui-form-item ui-form-item-textarea ui-border-b">
                            <textarea id="adsAddress" placeholder="街道等详细地址" style="padding-left:10px;"></textarea>
                        </div>
                        <div class="ui-btn-wrap" style="float:right;padding:5px 10px 5px 10px;" >
                            <button type="button" class="ui-btn ui-btn-progress" onclick="$('.ui-dialog').hide();clearAddress();" >
                                取消
                            </button>
                            <button type="button" class="ui-btn ui-btn-primary" onclick="actionAddress();">
                                确定
                            </button>
                        </div>
                        
                    </form>
                </div>        
            </div>
		</section>
	</body>

</html>